﻿@{
    Layout = null;
}
@model NB.MGJ.Model.AntiFleeing_SalesArea
@*<div>新增或编辑片区管理</div>*@
<style>
    .form-horizontal .form-group {
        margin-bottom: 15px;
    }
</style>

<form class="form-horizontal" id="AreaManagerModel" onkeydown="if(event.keyCode==13){return false;}">
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="red-600">*</span>片区名称：</label>
        <div class="col-sm-7">
            @Html.TextBoxFor(p => p.Name, new { @class = "form-control", @name = "Name", @placeholder = "请输入片区名称", maxlength = 50 })
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">联系人：</label>
        <div class="col-sm-7">
            <input type="text" class="form-control" placeholder="请输入联系人" value="@Model.Contacts" name="Contacts" maxlength="20">
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">联系方式：</label>
        <div class="col-sm-7">
            <input type="text" class="form-control" placeholder="请输入手机或电话(如：0511-4405222、021-87888822)" value="@Model.ContactTel" name="ContactTel" maxlength="13">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">备注：</label>
        <div class="col-sm-7">
            @*<input type="text" class="form-control" value="@Model.Remark" name="Remark">*@
            @Html.TextBoxFor(p => p.Remark, new { @class = "form-control", @name = "Remark"})
        </div>
    </div>
    <input type="text" style="display:none" name="ChangeDate" value="@Model.ChangeDate" />
    <input type="text" style="display:none" name="ID" value="@Model.ID" />
    <input type="text" style="display:none" name="ChangeLoginID" value="@Model.ChangeLoginID" />
    <input type="text" style="display:none" name="ChangeLoginName" value="@Model.ChangeLoginName" />
    <input type="text" style="display:none" name="CreateDate" value="@Model.CreateDate" />
    <input type="text" style="display:none" name="CreateLoginID" value="@Model.CreateLoginID" />
    <input type="text" style="display:none" name="CreateLoginName" value="@Model.CreateLoginName" />
    <input type="text" style="display:none" name="EnterpriseId" value="@Model.EnterpriseId" />
    <input type="text" style="display:none" name="Sequence" value="@Model.Sequence" />
    <input type="text" style="display:none" name="ViewDel" value="@Model.ViewDel" />

</form>
<script>
    $('#AreaManagerModel').bootstrapValidator({
       
        fields: {
            Name: {
                validators: {
                    notEmpty: {
                        message: '片区名称不能为空'
                    },
                    regexp: {
                        regexp: /^[a-zA-Z0-9_ \u4e00-\u9fa5]+$/,
                        message: '片区名称不能输入符号'
                    },
                    stringLength: {
                        max: 50,
                        message: '片区名称最大长度为50',
                    }
                }
            },
            Contacts: {
                validators: {
                    regexp: {
                        regexp: /^[a-zA-Z0-9\u4e00-\u9fa5]+$/,
                        message: '联系人不能输入符号'
                    },
                    stringLength: {
                        max: 20,
                        message: '联系人最大长度为20',
                    },
                }
            },
            ContactTel: {
                validators: {
                    regexp: {
                        regexp: /^[0-9]*$/,
                        message: '联系方式格式错误'
                    }
                }
            }
        }
    });
</script>